package com.ywgt.service.impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.ywgt.pojo.SearchHistory;
import com.ywgt.mapper.SearchHistoryMapper;
import com.ywgt.service.SearchHistoryService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 搜索历史表 服务实现类
 * </p>
 *
 * @author yiping
 * @since 2021-03-13
 */
@Service
public class SearchHistoryServiceImpl extends ServiceImpl<SearchHistoryMapper, SearchHistory> implements SearchHistoryService {

    @Override
    public Page<SearchHistory> getHistories(Integer userId, String keyWord, int page, int limit, String sort, String order) {
        PageHelper.startPage(page,limit);
        return baseMapper.selectHistories(userId,keyWord,sort,order);
    }
}
